<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<div class="modal fade" id="loginFormModal" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button class="close" type="button"
                        data-dismiss="modal">×
                </button>
                <h4 class="modal-title" id="myModalLabel">用户登录</h4>
            </div>
            <div class="modal-body">
                <form class="form-signin" id="loginForm" method="post"
                      action="${pageContext.request.contextPath}/user/login">
                    <h2 class="form-signin-heading">请输入账号信息</h2>
                    <label for="userName" class="sr-only">用户名</label>
                    <input type="email" name="user.username" id="userName" class="form-control"
                           placeholder="用户名" required autofocus>
                    <label for="userPass" class="sr-only">密码</label>
                    <input type="password" name="user.password" id="userPass" class="form-control"
                           placeholder="密码" required>
                    <div class="checkbox">
                        <label> <input type="checkbox" id="isRemember" name="isRemember" value="true" checked>
                            记住我
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <%--<button class="btn btn-primary" type="button" onclick="login('${redirUrl}')">登录</button>--%>
                <%--<button class="btn btn-primary" type="button" onclick="login()">登录</button>--%>
                <button class="btn btn-primary" type="button" onclick="submitLoginForm()">登录
                </button>
                <button class="btn btn-default" type="button" data-dismiss="modal"
                        <c:if test="${!empty backUrl}">onclick=closeLogForm('${backUrl}')</c:if>>关闭
                </button>
            </div>
        </div>
    </div>
</div>
		
